package com.frogs.ucenter.util;


/**
 * 
 *
 * @author lijian
 * @version 2014年8月6日 - 下午3:33:02
 */
public enum PaymentEnum {

	card_0("card0","充值卡"),
	/*
	alipay_CMBC("alipayCMBC","中国民生银行"),
	alipay_ABC("alipayABC","中国农业银行"),
	alipay_CMB("alipayCMB","招商银行"),
	alipay_GDB("alipayGDB","广东发展银行"),
	alipay_COMM("alipayCOMM","中国交通银行"),
	alipay_ICBCB2C("alipayICBCB2C","中国工商银行"),
	alipay_BOCB2C("alipayBOCB2C","中国银行"),
	alipay_CCB("alipayCCB","中国建设银行"),
	alipay_CIB("alipayCIB","兴业银行"),
	alipay_CEBBANK("alipayCEBBANK","中国光大银行"),
	
	bill99_CBHB("bill99CBHB","渤海银行"),
	bill99_GDB("bill99GDB","广东发展银行"),
	bill99_HXB("bill99HXB","华夏银行"),
	bill99_BCOM("bill99BCOM","交通银行"),
	bill99_HZB("bill99HZB","杭州银行"),
	bill99_SDB("bill99SDB","深圳发展银行"),
	bill99_NJCB("bill99NJCB","南京银行"),
	bill99_CITIC("bill99CITIC","中信银行"),
	bill99_BEA("bill99BEA","东亚银行"),
	bill99_CCB("bill99CCB","中国建设银行"),
	bill99_PAB("bill99PAB","平安银行"),
	bill99_NBCB("bill99NBCB","宁波银行"),
	bill99_CIB("bill99CIB","兴业银行"),
	bill99_ABC("bill99ABC","中国农业银行"),
	bill99_CMBC("bill99CMBC","中国民生银行"),
	bill99_CMB("bill99CMB","招商银行"),
	bill99_SRCB("bill99SRCB","上海农村商业银行"),
	bill99_SPDB("bill99SPDB","上海浦东发展银行"),
	bill99_ICBC("bill99ICBC","中国工商银行"),
	bill99_CEB("bill99CEB","中国光大银行"),
	bill99_BOC("bill99BOC","中国银行"),
	bill99_PSBC("bill99PSBC","中国邮政"),
	bill99_BOB("bill99BOB","北京银行"),
	
	bocomm_CMB("bocommCMB", "招商银行"),
	bocomm_ICBC("bocommICBC", "工商银行"),
	bocomm_CCB("bocommCCB", "建设银行"),
	bocomm_ABC("bocommABC", "农业银行"),
	bocomm_BOCSH("bocommBOCSH", "中国银行"),
	bocomm_SPDB("bocommSPDB", "浦发银行"),
	bocomm_GDB("bocommGDB", "广发银行"),
	bocomm_PSBC("bocommPSBC", "邮储银行"),
	bocomm_BOCOM("bocommBOCOM", "交通银行"),
	bocomm_CNCB("bocommCNCB", "中信银行"),
	bocomm_CEB("bocommCEB", "光大银行"),
	bocomm_HXB("bocommHXB", "华夏银行"),
	bocomm_CMBC("bocommCMBC", "民生银行"),
	bocomm_CIB("bocommCIB", "兴业银行"),
	
	alipay("alipay", "支付宝"),
	bill99("bill99", "快钱"),
	bocomm("bocomm", "交通银行");*/
	PAY_NULL("0","未知"),
	PAY_ZFB("1","支付宝"),
	PAY_WX("2","微信支付"),
	PAY_YL("3","银联");

	
	String name;
	String key;
	
	PaymentEnum(String key, String name){
        this.name = name;
        this.key = key;
    }
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	@Override
	public String toString() {
		return name;
	}
	
	/**
	 * 根据key获取具体的枚举值
	 * @param key
	 * @return
	 */
	public static PaymentEnum getByKey(String key){
		PaymentEnum[] typeEnums = values();
		for(int i = 0;i < typeEnums.length; i++) {
			if(typeEnums[i].getKey().equals(key)) {
				return typeEnums[i]; 
			}
		}
		return null;
	}
	
}
